package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserFollowDto;
import com.heima.user.service.ApUserFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户关注业务层
 *
 * @author 11494
 * @version 1.0
 * @project heima-leadnews-group
 * @date 2024/1/26 10:51:35
 */
@RestController
@RequestMapping("api/v1/user")
public class ApUserFollowController {
    @Autowired
    private ApUserFollowService apUserFollowService;

    /**
     * 功能描述：关注或取消关注
     *
     * @param apUserFollowDto
     * @return {@link ResponseResult }
     * @author sungang
     * @date 2024/01/26  11:20
     */

    @PostMapping("user_follow")
    public ResponseResult followOperation(@RequestBody ApUserFollowDto apUserFollowDto){
        return apUserFollowService.followOperation(apUserFollowDto);
    }
}
